 /**
 * Clasa Sin se refera la functia sinus de x
 * Derivata functiei este cos x
 */
 
package q10.Functii.FunctiiTrigonometrice;

import q10.Functii.Functie;
import q10.Visitor.Visitor;

public class Sin extends Functie {
	protected String sNume;
	public Sin(String s){
		sNume = s;
	}
	public Sin(){

	}
	public String getNume(){
		return sNume;
	}
	
	public void setNume(String s){
		sNume = s;
	}
	
	/**
	 *@param aux1
	 *@return String 
	 */
	public String concatTermeni(String aux1){
		String aux;
		int nrP;
		
		nrP = aux1.charAt(0) == '(' ? 0 : 2;
		aux = "sin";
		
		if(nrP != 0) aux += "(";
		
		aux += aux1;
		
		if(nrP != 0) aux +=")";
		
		return aux;
	}
	
	/**
	 * Metoda concatTermeni(String aux1) concateneaza termenii functiei pentru a putea fi afisati
	 * 
	 * @param String -valoarea primita
	 * @return String - valoarea returnata
	 */
	public static String concatTermens(String aux1)
    {
        String aux;
        int nrP;

        nrP = aux1.charAt(0) == '(' ? 0 : 2;
        aux = "sin";
        
        if (nrP != 0) aux += "(";
        aux += aux1;
        if (nrP != 0) aux += ")";

        return aux;
    }
	
	public void acceptVisitor(Visitor v){
		v.visit(this);
	}

}
